package cn.llssit.project.wechatapi.mapper;

import cn.llssit.project.wechatapi.domain.MovieRelease;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: Lesan
 * @Date: 2020-06-07
 */
@Mapper
@Repository
public interface MovieReleaseMapper {

    @Select("SELECT COUNT(*) AS num  FROM movie_release WHERE Mid = #{id} AND  DATE_FORMAT(startDate,'%Y%m%d') = #{Date}")
    Integer CountNum(Integer id, String Date);

    @Select("SELECT * FROM movie_release WHERE Mid = #{id} AND  DATE_FORMAT(startDate,'%Y%m%d') = #{Date}")
    List<MovieRelease> selectByDate(Integer id, String Date);

}
